<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<title>学生成绩表格导出excel</title>
	<meta charset='utf-8'>

	<script src="../static/js/jquery.min.js"></script>
	<script src="../static/js/echarts.common.min.js"></script>
	<script src="../static/js/echartsOne.js"></script>
	<link rel="stylesheet" href="../static/css/jquery.datatables.min.css" />
	<link rel="stylesheet" href="../static/css/buttons.dataTables.min.css" />
	<link rel="shortcut icon" href="../resources/favicon.ico" th:href="@{/static/favicon.ico}"/>
	<style>
		tbody td {
			text-align: center;
		}
	</style>

</head>
<body>
<!-- 表格 -->
<table id="example" class="display" role="grid" aria-describedby="example_info">
	<thead>
	<tr>
		<th>ID</th>
		<th>姓名</th>
		<th>密码</th>
		<th>班级</th>
		<th>操作</th>
	</tr>
	</thead>
	<tbody>
	<tr th:each="item:${studentList}">
		<td th:text="${item.getS_id()}"></td>
		<td th:text="${item.getS_name()}"></td>
		<td th:text="${item.getS_pwd()}"></td>
		<td th:text="${item.getCla_name()}"></td>
		<td>
			<span class="iconfont icon-bianjihdpi"><a th:href="@{/admin/preModifyStudentStaffManagementController(id=${item.getS_id()})}">编辑</a></span>/
			<span class="iconfont icon-cangpeitubiao_shanchu"><a href="#" th:onclick="'javascript:drop(' + ${item.getS_id()} +')'">删除</a></span>
		</td>
	</tr>
	</tbody>
	<tfoot>
	<tr>
		<th>ID</th>
		<th>姓名</th>
		<th>密码</th>
		<th>班级</th>
		<th>操作</th>
	</tr>
	</tfoot>
</table>

<script src="../../static/js/jquery.min.js"></script>
<script src="../../static/js/jquery.datatables.min.js"></script>
<script src="../../static/js/dataTables.buttons.min.js"></script>
<script src="../../static/js/jszip.min.js"></script>
<script src="../../static/js/buttons.html5.min.js"></script>
<script src="../../static/js/buttons.flash.min.js"></script>
<script src="../../static/js/pdfmake.min.js"></script>
<script src="../../static/js/vfs_fonts.js"></script>
<script src="../../static/js/buttons.print.min.js"></script>
<script>
	// 删除
	function drop(id) {
		if (confirm("你确定要删除作业吗？")) {
			window.location.href = "/admin/dropStudentStaffManagementController?id=" + id;
		}
	}
	$(document).ready(function() {
		$('#example').DataTable({
			dom: 'Bfrtip',
			language: {
				emptyTable: '没有数据',
				loadingRecords: '加载中...',
				processing: '查询中...',
				search: '检索:',
				lengthMenu: '每页 _MENU_ 件',
				zeroRecords: '没有数据',
				paginate: {
					'first': '第一页',
					'last': '最后一页',
					'next': '下一页',
					'previous': '上一页'
				},
				info: '第 _PAGE_ 页 / 总 _PAGES_ 页',
				infoEmpty: '没有数据',
				infoFiltered: '(过滤总件数 _MAX_ 条)',
			},
			buttons: [
				{
					extend: 'excelHtml5',
					title: 'Data export'
				},
				{
					extend: 'pdfHtml5',
					title: 'Data export'
				},
			]
		});

		$(".buttons-excel").text('导出到excel');
		$(".buttons-pdf").text('导出到pdf');
	});
</script>
</body>
</html>
